<?php
/***********************************************
	This class would retrieve data from a PHP
	array.
************************************************/
class ThumbnailsInFolderDeleter {
	private $thumbnails = NULL;
	
	/************************************************************/
	
	function __construct($folderPath) {
		$this->thumbnails = glob($folderPath."*");
		
		foreach ($this->thumbnails as $thumbnail) {
			if (exif_imagetype($thumbnail) == IMAGETYPE_JPEG) {
				unlink($thumbnail);
			} elseif (exif_imagetype($thumbnail) == IMAGETYPE_PNG) {
				unlink($thumbnail);
			} elseif (exif_imagetype($thumbnail) == IMAGETYPE_GIF) {
				unlink($thumbnail);
			}
		}
	}
}
?>